import XxDatePicker from '@/ui/xx-datepicker/xx-Datepick';
import { Input, Form, Radio, Space } from 'antd';
import React, { useState } from 'react';
const XxpublishTimeComponent = ({
    label = "上架时间"
}) => {
    const [value, setValue] = useState(1);
    const onChange = (e) => {
        console.log('radio checked', e.target.value);
        setValue(e.target.value);
    };
    return (
        <Form.Item label={label} name='rackDateTime'>
            <Radio.Group onChange={onChange} value={value}>
                <Space direction="vertical">
                    <Radio value={1}>立即发布</Radio>
                    <Radio value={2}>
                        定时发布
                        {value === 2 ? (
                            <XxDatePicker showTime={true} format="YYYY-MM-DD hh:mm:ss" />
                        ) : null}
                    </Radio>
                    <Radio value={3}>存入草稿</Radio>

                </Space>
            </Radio.Group>
        </Form.Item>

    );
};
export default XxpublishTimeComponent;